﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

namespace Photo.Module
{
    public partial class ucAlbum : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                loaddata();
                LoadrprNews();
            }
        }

        private void loaddata()
        {
            Repeater1.DataSource = new AlbumBL().SelectAll();
            Repeater1.DataBind();
        }
        private void LoadrprNews()
        {
            CollectionPager1.MaxPages = 10000;

            CollectionPager1.PageSize = 30;

            CollectionPager1.DataSource = new AlbumBL().SelectAll().DefaultView;

            CollectionPager1.BindToControl = Repeater1;
            Repeater1.DataSource = CollectionPager1.DataSourcePaged;
            Repeater1.DataBind();
        }
    }
}